﻿@{
    ViewBag.Title = "View";
}
@using SAD_SiS.ViewModels;
@using SAD_SiS.Models;
@model PagingView
<div id='left-menu-container' class="span3">
    <ul id='left-menu'>
        <li>
            <div class="menu-block">
                <div class="subhead">
                    Quảng cáo
                </div>
                <div class="block-body">
                    <ul class="nav nav-list">
                        <li><a href="#">content</a></li>
                        <li><a href="#">content</a></li>
                        <li><a href="#">content</a></li>
                        <li><a href="#">content</a></li>
                        <li><a href="#">content</a></li>
                        <li class="divider"></li>
                    </ul>
                </div>
            </div>
        </li>
    </ul>
</div>
@{
    if (Model.SelectCate.isLeaf == false)
    {
        return;
    }
}
@{
    <div id='book-list'>
        <div id="new-book" class='book-div'>
            <a href="@Url.Action("View", "Category", new { id = Model.SelectCate.LinkName }, null)" class='mygreenlink'>
                <h4>
                    @Model.SelectCate.CateName mới nhất</h4>
            </a>
            <ul id='first-carousel'>
                @if (Model.ProductList.Count == 0)
                {
                    <h5>
                        Chưa có thông tin</h5>
                    
                }
                else
                {
                    <div id='paging-link'>
                        Trang : @Html.PageLinks(Model, x => Url.Action("View", new { page = x }))
                    </div>
                    foreach (var i in Model.ProductList)
                    {
                    <li>
                        <div class="thumbnail">
                            <a href="@Url.Action("Details", "Product", new { id = @i.ProductID })">
                                <img src="@Url.Content("~/Content/ProductPic/" + @i.pic)" alt="@i.Name" style="width:140px;height:140px"></a>
                            <div class="caption">
                                <a href="@Url.Action("Details", "Product", new { id = @i.ProductID })">
                                    <h5>
                                        @i.Name</h5>
                                </a>
                                <p>
                                    <a href="@Url.Action("View", "Shop", new { id = @i.LinkName }, null)">@i.ShopName</a>
                                </p>
                                <span class="label lblSuccess">@i.SellPrice .000đ</span> <span class="fullprice">@i.Price
                                    .000đ</span>
                            </div>
                        </div>
                    </li>
                    }
                    <div id='paging-link'>
                        Trang : @Html.PageLinks(Model, x => Url.Action("View", new { page = x }))
                    </div>
                }
            </ul>
        </div>
    </div>
}
